<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Step 1: Enabling the Snapshot Function for the HDFS Directory">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="hdfs_00012.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
<meta name="DC.Publisher" content="20241029">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="hdfs_00013">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Step 1: Enabling the Snapshot Function for the HDFS Directory</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="hdfs_00013"></a><a name="hdfs_00013"></a>

<h1 class="topictitle1">Step 1: Enabling the Snapshot Function for the HDFS Directory</h1>
<div><p>Before performing protection, enable the snapshot function for the directory where the HDFS files to be protected reside.</p>
<div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>Use PuTTY to log in to any NameNode in the big data cluster.</span></li><li><span>Run the following commands as user <strong>root</strong> to enable the snapshot function for the directory:</span><p><pre class="screen">source <em>Installation directory</em>/bigdata_env</pre>
<pre class="screen">hdfs dfsadmin -allowSnapshot <em>directory_name</em></pre>
<p><em>directory_name</em> indicates the parent directory of the fileset to be protected. For details about how to manage snapshots, see <a href="en-us_topic_0000002024918278.html">Managing Snapshots</a>.</p>
<p>If command output similar to the following is displayed, the snapshot function for the HDFS directory has been enabled:</p>
<pre class="screen">[rootenrs1 hadoopclient]# hdfs dfsadmin -allowSnapshot /
Allowing snapshot on / succeeded</pre>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="hdfs_00012.html">Backing Up HDFS Filesets</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>